package com.atguigu.controller;


import com.atguigu.pojo.Animal;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/animal")
public class HelloController {

    @Autowired
    private Animal animal;

    @GetMapping("/h01")
    public String h01(){
        return animal.toString();
    }
}
